package com.th.supcom.pds.phamapply.client.service;

import java.util.List;

import net.carefx.framework.container.client.exception.UiException;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.th.supcom.pds.common.client.model.PtsPaiAdtLogModel;
import com.th.supcom.pds.phamapply.client.common.InpPhamApplyServiceFactory;
import com.th.supcom.pds.phamapply.client.model.InpPhamApplyDetailModel;
import com.th.supcom.pds.phamapply.client.model.InpPhamApplyPatInfoModel;
import com.th.supcom.pds.phamapply.client.model.PrescSearchDTOModel;

/**
 * NurseReturn 服务接口.
 * 
 * 住院摆药请领明细.
 */
@RemoteServiceRelativePath (InpPhamApplyServiceFactory.BASE_URL + "nurseReturn.do")
public interface NurseReturnRpc extends RemoteService
{
    /**
     * @param bedNo 床号
     * @param nurseUnitCode 护士站编码
     * @return
     * @throws UiException
     */
    public InpPhamApplyPatInfoModel getPatInfoByBedNo (String bedNo, String nurseUnitCode) throws UiException;

    /**
     * 通过患者ID查询患者信息
     * 
     * @param patientId 请领号
     * @return
     * @throws UiException 异常信息
     */
    public List <InpPhamApplyPatInfoModel> findPatInfoByPatientId (String patientId) throws UiException;

    /**
     * @param paiVisitId 患者住院流水号
     * @return 获取患者ADT流转日志列表.
     * @throws UiException
     */
    public List <PtsPaiAdtLogModel> findInPatientAdtLogInfoById (Long paiVisitId) throws UiException;

    /**
     * 根据 患者相关信息查询患者就诊明细
     * 
     * @param prescSearchDTOModel 查询条件
     * @return 获取患者计费明细
     * @throws UiException
     */
    public List <InpPhamApplyDetailModel> findChargeItemByExample (PrescSearchDTOModel prescSearchDTOModel) throws UiException;

    /**
     * 生成电子退药单
     * 
     * @param inpPhamApplyDetailModels
     * @param operator 操作人
     * @param generateFlag true: 生成电子退药单，false: 生成退药处方
     * @param ptsPaiVisitModel 患者信息
     * @throws UiException
     */
    public void generateBill (List <InpPhamApplyDetailModel> inpPhamApplyDetailModels, String nurseUnit, String operator, InpPhamApplyPatInfoModel inpPhamApplyPatInfoModel ) throws UiException;

    /** 公司版权信息. */
    public static final String copyright = "Copyright 2014, TH Supcom Corporation";

    /** 提交路径. */
    public static final String SCC_BRANCH = "$URL$";

    /** 提交日期. */
    public static final String SCC_LAST_MODIFICATION_DATE = "$Date$";

    /** 最终修改人员. */
    public static final String SCC_LAST_MODIFIER_NAME = "$Author$";

    /** 最终版本号. */
    public static final String SCC_REVISION = "$Revision$";
}